<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
	<meta name="language" content="EN" scheme="DCTERMS.RFC3066" />
	<meta name="creator" content="Felix Nagel, http://www.felixnagel.com for Namics (Deutschland) GmbH, http://www.namics.com" />
	<script type="text/javascript">	
		$(function() {
			$("#insertTestView").click(function(){
				location.href="insertTestView.do";	
		});
			
			var table1 = $("table").ariaSorTable({
				rowsToShow: 10,
				pager: true,
				onInit: function() {
					demoControl();
				},
				colsToHide: {
					1: true,
					7: true
				}
			});
			$("#destroy").click(function (event) { 
				table1.ariaSorTable('destroy');
			});		
			$("#disable").click(function (event) { 
				table1.ariaSorTable('disable');
			});			
			
			// add themeswitcher
			var ts = $('<div class="ui-button ui-widget ui-state-default ui-corner-all" style="font-size: 0.7em; padding: 5px; position: absolute; top: 20px; right: 10px;">Click here to add Themeswitcher!</div>')
			.appendTo('body')
			.bind("click", function() {
				ts.text("Loading Themeswitcher...");
				$.getScript('http://ui.jquery.com/applications/themeroller/themeswitchertool/', function() {
					ts.removeClass("ui-button ui-widget ui-state-default ui-corner-all").text("").unbind("click").themeswitcher(); 
				});
			});
			
		});		
	</script>
	<h2>Test Manage</h2>
	<link href="${initParam.root}/css/style.css" rel="stylesheet" />
	<table>
			<thead>
				<tr>
					<th class="ui-table-asc ui-state-active ui-table-number ui-state-default" style="min-width: 2em;"><a href="#server_site_order">no</a></th>
					<th class="ui-table-number ui-state-default" style="min-width: 10em;"><a href="#server_site_order">123</a></th>
					<th class="ui-table-number ui-state-default" style="min-width: 1em;"><a href="#server_site_order">grade</a></th>
					<th class="ui-table-number-de ui-state-default" style="min-width: 10em;">question</th>
					<th class="ui-table-number ui-state-default" style="min-width: 6em;"><a href="#server_site_order">example</a></th>
					<th class="ui-table-date-de ui-state-default" style="min-width: 8em;"><a href="#server_site_order">answer</a></th>
					<th class="ui-table-date-de ui-state-default" style="min-width: 4em;"><a href="#server_site_order">수정</a></th>
				</tr>
			</thead>
			<tbody>	
				<c:forEach items="${requestScope.tList }" var="tList">
					<tr>
						<td>${tList.no }</td>
						<td></td>
						<td>${tList.grade }</td>
						<td>${tList.question }</td>
						<td>${tList.example1 } ${tList.example2 } ${tList.example3 } ${tList.example4 }</td>
						<td>${tList.answer }</td>
						<td><a href="updateTestView.do?no=${tList.no}">수정정</a></td>
					</tr>
					
				</c:forEach>
			</tbody>
	</table>    
<form method="get" action="gradeByTest.do">
 <table>
 <tr>
 	<td>
 		<input type="button" value="문제만들기" id="insertTestView">
 	</td>
 	<td>
 	
 		회원검색 : 
		<select id="grade" name="grade">
			<option value="all">전체등급</option>
			<option value="1">1</option>
			<option value="2">2</option>
			<option value="3">3</option>
			<option value="4">4</option>
			<option value="5">5</option>
		</select>
 	</td>
	<td>
		<input type="text" name="question" >
 	</td>
 	<td>
		<input type="submit" value="검색"  id="findGradeForm"> 
 	</td>
</tr>
 </table>
 </form>
</html>